//
//  MotionViewController.m
//  SDKSample
//
//  Created by 小肥羊 on 15/12/15.
//  Copyright © 2015年 Zhu‘s Game House. All rights reserved.
//

#import "MotionViewController.h"
#import "XFYMotionView.h"
#import "XFYInnervationView.h"

@interface MotionViewController ()

@end

@implementation MotionViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
}

- (IBAction)innervationView:(id)sender {
    XFYInnervationView *innervationView = [[XFYInnervationView alloc] initWithFrame:CGRectMake(8, kNavbarHeight + 8, kScreenWidth - 16, 180)];
    [innervationView setBackgroundColor:[UIColor grayColor]];
    [self.view addSubview:innervationView];
    UIImageView *image = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"mybg.jpg"]];
    innervationView.contentView = image;
}

- (IBAction)showMotionView:(id)sender {
    XFYMotionView *motionView = [[XFYMotionView alloc] initWithFrame:CGRectMake(8, kNavbarHeight + 8, kScreenWidth - 16, 80)];
    [motionView setBackgroundColor:[UIColor grayColor]];
    motionView.image = [UIImage imageNamed:@"test.jpg"];
    [self.view addSubview:motionView];
    
    XFYMotionView *motionView2 = [[XFYMotionView alloc] initWithFrame:CGRectMake(8, kNavbarHeight + 96, kScreenWidth - 16, 280)];
    [motionView2 setBackgroundColor:[UIColor grayColor]];
    motionView2.image = [UIImage imageNamed:@"test.jpg"];
    [self.view addSubview:motionView2];
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
